<?php

namespace api\controllers;

use common\core\controller\PublicController;
use yii\helpers\Url;

class DocController extends PublicController
{

    public function actions()
    {
        return [
            'index' => [
                'class'   => 'lengbin\swagger\SwaggerAction',
                //'version' => \lengbin\swagger\SwaggerAction::SWAGGER_VERSION_TWO,
                'url'     => Url::to(['/doc/api'], true),
            ],
            'api'   => [
                'class'   => 'lengbin\swagger\SwaggerApiAction',
                'scanDir' => [
                    \Yii::getAlias('@common/swagger'),
                    \Yii::getAlias('@api/swagger'),
                ],
            ],
        ];
    }

}
